package tmp.arno.Merger;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Quchong {
	public static void main(String[] args) throws SQLException {
		Connection con=DAO.DbcpConnection.getConnection();
		String sql="select * from guo_uukeyTouukey";
		Statement st=con.createStatement();
		PreparedStatement pst=con.prepareStatement("update all_detail2 set uukey=? where uukey=?");
		ResultSet rs=st.executeQuery(sql);
		while (rs.next()) {
			long fromuukey=rs.getLong("fromuukey");
			long touukey=rs.getLong("touukey");
			pst.setLong(1, touukey);
			pst.setLong(2, fromuukey);
			pst.addBatch();
		}
		pst.addBatch();
	}
}
